package com.example.mr5.frogge;

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;

/**
 * Created by Mr.5
 * Date：2016/5/9.
 * Time：09:55
 */
public class FroggeActivity extends AppCompatActivity {

    GameView gameView;
    Button reStart;
    TextView rule;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_frogge);

        gameView = (GameView) findViewById(R.id.game_view);
        reStart = (Button) findViewById(R.id.re_start);
        rule = (TextView) findViewById(R.id.frog_rule);

        rule.setText(getResources().getText(R.string.text_frog_rule));

        reStart.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                gameView.ReStartGame();
            }
        });
    }
}
